'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
  const { router, controller } = app;
  router.get('/', controller.home.index);

  router.get('/users', controller.home.users);

  router.get('/users/:userId', controller.home.updateUser);

  router.get('/users/:userId/books', controller.home.userBooks);

  router.post('/users/:userId/book/:bookId', controller.home.updateBook);

  router.post('/test', controller.home.test);
};
